.@{surely-table-prefix-cls}-wrapper {
  clear: both;
  max-width: 100%;
  .clearfix();
  &-dark {
    color-scheme: dark;
  }
}
.@{surely-table-prefix-cls} {
  .reset-component();
  position: relative;
  display: flex;
  flex-direction: column;
  background: ~'var(--@{surely-table-prefix-cls}-bg)';
  font-size: @table-font-size;
  border-radius: @table-border-radius-base @table-border-radius-base 0 0;
  // border-top: 1px @table-border-color solid;
  flex-shrink: 0;

  [class^='@{surely-table-prefix-cls}'] {
    box-sizing: border-box;
    outline: none;
  }
  &-body-inner-measure,
  &-body-scroll-measure {
    position: absolute;
    top: 0px;
    left: 0px;
    pointer-events: none;
    width: 100%;
    min-width: 100%;
    height: 1px;
    opacity: 0;
    z-index: -1;
  }
  &-scroll-layer {
    position: absolute;
    top: 0px;
    left: 0px;
    pointer-events: none;
    width: 100%;
  }
  &-scroll-layer-inner {
    pointer-events: all;
  }
  &-position-absolute {
    position: absolute;
  }
  &-body,
  &-header,
  &-summary {
    display: flex;
    position: relative;
    height: 100%;
    width: 100%;
    flex: 1 1 auto;
    flex-direction: row;
  }
  &-header {
    border-radius: @table-border-radius-base @table-border-radius-base 0 0;
  }
  &-header,
  &-summary {
    flex-grow: 0;
    flex-shrink: 0;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: @table-header-bg;
    transition: background-color 0.3s ease;
    .@{surely-table-prefix-cls}-row {
      opacity: 1;
    }
  }

  &-summary {
    z-index: 3;
    background: @background-color-summary;
    border-top: @table-border-width-base @table-border-style-base @table-border-color;
    .@{surely-table-prefix-cls}-fix-left,
    .@{surely-table-prefix-cls}-fix-right {
      background: @background-color-summary;
    }
  }
  &-summary-fixed-top {
    border-top: none;
    border-bottom: @table-border-width-base @table-border-style-base @table-border-color;
  }

  &-summary-container {
    flex-direction: column;
    width: 100%;
    overflow-y: hidden;
  }

  &-body-container,
  &-header-container,
  &-summary-container {
    display: flex;
    height: 100%;
    // transform: translateZ(0);
    > div {
      flex-shrink: 0;
      flex-grow: 0;
    }
  }
  &-body-viewport-container,
  &-body-container {
    -webkit-overflow-scrolling: touch;
  }
  &-body-contextmenu-container {
    display: none;
  }
  &-popup-container {
    min-width: 120px;
    min-height: 60px;
  }
  &-body-contextmenu-container,
  &-popup-container {
    position: absolute;
    z-index: 9;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background-color: ~'var(--@{surely-table-prefix-cls}-component-background)';
    border-radius: @border-radius-base;
    border: @table-border-width-base @table-border-style-base @table-border-color;
    overflow: auto;
    box-sizing: content-box !important;
    padding: 0;
    box-shadow: ~'var(--@{surely-table-prefix-cls}-popup-shadow)';
  }

  &-unselectable {
    user-select: none;
  }

  &-header-container &-center-container {
    height: 100%;
  }

  &-sticky-header {
    position: sticky;
    z-index: 9;
  }
  &-header {
    &:not(.@{surely-table-prefix-cls}-show-header-scrollbar)
      .@{surely-table-prefix-cls}-center-viewport {
      -ms-overflow-style: none; /* Internet Explorer 10+ */
      scrollbar-width: none; /* Firefox */
    }
    &:not(.@{surely-table-prefix-cls}-show-header-scrollbar)
      .@{surely-table-prefix-cls}-center-viewport::-webkit-scrollbar {
      /* webkit */
      width: 0px;
      display: none;
    }
  }

  &-center,
  &-center-viewport,
  &-horizontal-scroll-viewport {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 100%;
  }
  &-center-viewport,
  &-horizontal-scroll-viewport {
    overflow: hidden;
  }
  &-center-viewport {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    display: flex;
  }
  &-center-container {
    position: relative;
    display: block;
    // transform: translateZ(0);
  }
  &-fix-left {
    position: relative;
    position: sticky;
    left: 0;
    z-index: 3;
  }
  &-fix-right {
    position: relative;
    position: sticky;
    right: 0;
    z-index: 3;
  }
  &-summary-cell-fixed-left {
    position: relative;
    position: sticky;
    left: 0;
    z-index: 3;
  }

  &-summary-cell-fixed-right {
    position: relative;
    position: sticky;
    right: 0;
    z-index: 3;
  }
  &-header-scrollbar,
  &-summary-scrollbar {
    border-bottom: @table-border-width-base @table-border-style-base @table-border-color;
  }
  .@{surely-table-prefix-cls}-cell-shadow-left {
    &::after {
      position: absolute;
      top: 0;
      right: 0;
      bottom: -1px;
      width: 30px;
      transform: translateX(100%);
      transition: box-shadow 0.3s;
      content: '';
      pointer-events: none;
      box-shadow: inset 10px 0 8px -8px @table-ping-box-shadow-color;
      opacity: 0;
    }
  }

  .@{surely-table-prefix-cls}-cell-shadow-right {
    &::after {
      box-shadow: inset -10px 0 8px -8px @table-ping-box-shadow-color;
      position: absolute;
      top: 0;
      bottom: -1px;
      left: 0;
      width: 30px;
      transform: translateX(-100%);
      transition: box-shadow 0.3s;
      content: '';
      pointer-events: none;
      opacity: 0;
    }
  }

  &-ping-left .@{surely-table-prefix-cls}-cell-shadow-left,
  &-ping-right .@{surely-table-prefix-cls}-cell-shadow-right {
    &::after {
      opacity: 1;
    }
  }

  // ============================ Auto Header Height Fixed =============================
  &-cell-fix-left,
  &-cell-fix-right {
    position: sticky !important;
    z-index: 2;
    background: ~'var(--@{surely-table-prefix-cls}-bg)';
  }

  &-cell-fix-left-first::after,
  &-cell-fix-left-last::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: -1px;
    width: 30px;
    transform: translateX(100%);
    // transition: box-shadow 0.3s;
    content: '';
    pointer-events: none;
  }

  &-cell-fix-right-first::after,
  &-cell-fix-right-last::after {
    position: absolute;
    top: 0;
    bottom: -1px;
    left: 0;
    width: 30px;
    transform: translateX(-100%);
    // transition: box-shadow 0.3s;
    content: '';
    pointer-events: none;
  }
  &-ping-left {
    .@{surely-table-prefix-cls}-cell-fix-left-first::after,
    .@{surely-table-prefix-cls}-cell-fix-left-last::after {
      box-shadow: inset 10px 0 8px -8px @table-ping-box-shadow-color;
    }
    .@{surely-table-prefix-cls}-cell-fix-left-last .@{surely-table-prefix-cls}-cell-box::before {
      opacity: 0;
    }
    .@{surely-table-prefix-cls}-cell-fix-left-last::before {
      background-color: transparent !important;
    }
  }

  &-ping-right {
    .@{surely-table-prefix-cls}-cell-fix-right-first::after,
    .@{surely-table-prefix-cls}-cell-fix-right-last::after {
      box-shadow: inset -10px 0 8px -8px @table-ping-box-shadow-color;
    }
  }

  &-row {
    //transition: transform 0.2s, top 0.2s, height 0.2s, -webkit-transform 0.2s, background-color 0.1s;
    opacity: 0;
    color: @text-color;
    background-color: ~'var(--@{surely-table-prefix-cls}-row-bg)';
    width: 100%;
    display: flex;
    align-items: center;
    position: absolute;
    transition: background-color 0.3s;
    border-bottom: @table-border;

    &.@{surely-table-prefix-cls}-row-hover {
      background: @table-row-hover-bg;
    }
    &.@{surely-table-prefix-cls}-row-selected {
      background-color: @table-selected-row-bg;
      .@{surely-table-prefix-cls}-cell:not(.@{surely-table-prefix-cls}-body-cell-range-selected) {
        background-color: inherit;
      }
      &.@{surely-table-prefix-cls}-row-hover {
        background: @table-selected-row-hover-bg;
      }
    }
    &.@{surely-table-prefix-cls}-row-dragging,
    &.@{surely-table-prefix-cls}-row-dragging-insert-target {
      background: @table-row-hover-bg;
      cursor: move;
      &::after {
        content: '';
        pointer-events: none;
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 100%;
        background: @table-row-hover-bg;
        opacity: 0.5;
        cursor: move;
      }
    }
    &.@{surely-table-prefix-cls}-row-dragging-insert-target {
      background: @table-row-insert-bg;
      &::after {
        background: @table-row-insert-bg;
      }
    }
    &.@{surely-table-prefix-cls}-row-selected {
      &.@{surely-table-prefix-cls}-row-dragging {
        background: @table-selected-row-hover-bg;
      }
      &.@{surely-table-prefix-cls}-row-dragging-insert-target {
        background: @table-row-insert-bg;
      }
    }
  }
  &-has-animate &-row {
    transition: transform 0.2s, top 0.2s, height 0.2s, -webkit-transform 0.2s, background-color 0.1s;
    // transition: background-color 0.1s, opacity 0.4s;
  }

  &.@{surely-table-prefix-cls}-stripe .@{surely-table-prefix-cls}-body {
    .@{surely-table-prefix-cls}-row-odd:not(.@{surely-table-prefix-cls}-row-selected) {
      background: @background-color-selected;
    }
  }

  &-cell {
    position: absolute;
    top: 0;
    height: 100%;
    flex: none;
    display: flex;
    align-items: center;
    border-bottom: @table-border-width-base @table-border-style-base @table-border-color;
    overflow-y: hidden;
    overflow-y: clip;
    overflow-x: visible;
    padding: 0 !important;
    &[rowspan]:not([rowspan='1']):not(th) {
      z-index: 1;
      background-color: inherit;
    }
    &[colspan]:not([colspan='1']):not(th) {
      z-index: 1;
      background-color: inherit;
    }
    [rowspan='0'] {
      visibility: hidden;
      z-index: -1;
    }
    &-inline-edit:focus-within {
      outline-color: transparent;
    }
    &-inline-edit > * {
      visibility: hidden;
    }
    > .@{surely-table-prefix-cls}-cell-edit-wrapper {
      visibility: visible;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      min-height: 100%;
      width: 100%;
      display: flex;
      flex-direction: row;
      align-items: center;
      border: 1px solid ~'var(--@{surely-table-prefix-cls}-primary-color-4)';
      box-sizing: border-box;
      > .@{surely-table-prefix-cls}-cell-edit-inner {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        line-height: normal;
        padding: @table-padding-horizontal;
      }
    }
    &-edit-input {
      border-color: transparent;
      background-color: transparent;
      height: 100%;
      width: 100%;
      color: inherit;
      line-height: inherit;
      font-size: inherit;
      font-family: inherit;
      font-feature-settings: inherit;
      -webkit-font-smoothing: subpixel-antialiased;

      &:focus {
        background-color: transparent;
      }
    }
  }
  &-body-cell {
    border: 1px solid transparent;
  }
  &-body &-body-cell {
    &-range-selected:not(&-inline-edit) {
      background-color: ~'var(--@{surely-table-prefix-cls}-primary-color-1)';
    }
    &-range-selected-2:not(&-inline-edit) {
      background-color: ~'var(--@{surely-table-prefix-cls}-primary-color-2)';
    }
    &-range-selected-3:not(&-inline-edit) {
      background-color: ~'var(--@{surely-table-prefix-cls}-primary-color-3)';
    }
    &-range-selected-4:not(&-inline-edit) {
      background-color: ~'var(--@{surely-table-prefix-cls}-primary-color-4)';
    }
    &-range-selected {
      &.@{surely-table-prefix-cls}-body-cell-range-left {
        border-left-color: ~'var(--@{surely-table-prefix-cls}-cell-focus-border-color)';
      }
      &.@{surely-table-prefix-cls}-body-cell-range-right {
        border-right-color: ~'var(--@{surely-table-prefix-cls}-cell-focus-border-color)';
      }
      &.@{surely-table-prefix-cls}-body-cell-range-top {
        border-top-color: ~'var(--@{surely-table-prefix-cls}-cell-focus-border-color)';
      }
      &.@{surely-table-prefix-cls}-body-cell-range-bottom {
        border-bottom-color: ~'var(--@{surely-table-prefix-cls}-cell-focus-border-color)';
      }
      &.@{surely-table-prefix-cls}-body-cell-range-single-cell {
        border-color: ~'var(--@{surely-table-prefix-cls}-cell-focus-border-color)';
      }
    }
  }

  // &-no-height &-cell:not(&-extra-cell) {
  //   // align-items: start;
  // }
  &-cell-hidden {
    visibility: hidden;
  }
  &-cell-multi &-cell-inner {
    overflow: auto;
    max-height: 100%;
  }
  &-cell-inner {
    // padding: @table-padding-vertical @table-padding-horizontal;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    min-width: 1px;
    flex-grow: 1;
    flex-shrink: 1;
    display: inline-flex;
    align-items: center;
  }
  &-cell-inner &-cell-content {
    // padding: 0 @table-padding-horizontal;
    padding: @table-padding-vertical @table-padding-horizontal;
    width: 100%;
    overflow-wrap: break-word;
    -webkit-font-smoothing: subpixel-antialiased;
  }
  &-cell-inner &-cell-content:not(&-cell-text-ellipsis) {
    white-space: normal;
    word-break: break-all;
  }
  &.@{surely-table-prefix-cls}-auto-height &-cell {
    display: flex;
    align-items: center;
  }
  &-header-cell {
    display: inline-flex;
    padding: 0 !important;
    align-items: center;
    float: left;
    color: @table-header-color;
    font-weight: 500;
    text-align: left;
    overflow: visible;
    background-color: @table-header-bg;
    transition: background-color 0.2s ease;
    &[colspan]:not([colspan='1']) &-title {
      text-align: center;
      justify-content: center;
    }
  }
  &-extra-cell,
  &-header-extra-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: left;
    min-width: 1px;
    text-align: center;
  }
  &-header-cell-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: auto;
    max-width: 100%;
    // padding: 0 @table-padding-horizontal;
    max-width: 100%;
    &-inner {
      overflow: hidden;
      overflow-wrap: break-word;
      -webkit-font-smoothing: subpixel-antialiased;
      white-space: nowrap;
      flex-grow: 1;
    }
  }
  &-auto-header-height {
    .@{surely-table-prefix-cls}-header-cell {
      position: relative;
      padding: @table-padding-vertical 0 !important;
      display: table-cell;
      float: unset;
      &-title-inner {
        white-space: unset;
      }
      .@{surely-table-prefix-cls}-cell-box {
        width: unset;
      }
    }
  }

  &-summary-row {
    position: relative;
    display: flex;
    flex-grow: 0;
    flex-shrink: 0;
    flex-direction: row;
    align-items: stretch;
    border-bottom: @table-border-width-base @table-border-style-base @table-border-color;
  }
  &-summary-cell {
    position: relative;
    flex: 1;
    height: auto;
    background: @background-color-summary;
    border-bottom: none;
    white-space: normal;
  }
  &-summary-cell-fixed-left,
  &-summary-cell-fixed-right {
    z-index: 1;
  }
  &-column-title {
    position: unset;
    display: flex;
    width: 1px;
    z-index: 1;
    flex: 1;
  }
  &-cell-box {
    padding: 0 @table-padding-horizontal;
    &::before {
      position: absolute;
      top: 50%;
      right: 1px;
      width: 1px;
      height: 1.6em;
      pointer-events: none;
      background-color: @table-header-cell-split-color;
      transform: translateY(-50%);
      transition: background-color 0.3s;
      content: '';
    }
  }

  &-cell-auto-height {
    height: 100%;
  }
  &-cell-wrap-text {
    white-space: normal;
    word-break: break-all;
  }
  &-cell-text-ellipsis,
  &-cell-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    word-break: keep-all;
  }

  &-cell-group {
    display: block;
    padding: 0 !important;
    border: none;
    &::before {
      position: absolute;
      top: 50%;
      right: 0;
      width: 1px;
      height: 1.6em;
      pointer-events: none;
      background-color: @table-header-cell-split-color;
      transform: translateY(-50%);
      transition: background-color 0.3s;
      content: '';
      z-index: 1;
    }
  }
  &-cell-group-title {
    text-align: center;
    position: relative;
    width: 100%;
    justify-content: center;
    background-color: @table-header-bg;
    transition: background-color 0.2s ease;
    &::before {
      background-color: transparent;
    }
  }
  &-cell-group-children {
    padding: 0 !important;
    position: relative;
    > div:last-child > .@{surely-table-prefix-cls}-cell-box {
      &::before {
        background-color: transparent;
      }
    }
    > .@{surely-table-prefix-cls}-cell-group:last-child {
      &::before {
        background-color: transparent;
      }
    }
  }

  &-cell-group-children &-header-cell:first-child &-header-cell-title::before {
    background-color: transparent;
  }

  &-ping-left &-header &-fix-left,
  &-header-container &-last-columns {
    .@{surely-table-prefix-cls}-header-cell:not(.@{surely-table-prefix-cls}-cell-group):last-child {
      .@{surely-table-prefix-cls}-cell-box {
        &::before {
          background-color: transparent;
        }
      }
    }
    .@{surely-table-prefix-cls}-row > .@{surely-table-prefix-cls}-cell-group:last-child {
      &::before {
        background-color: transparent;
      }
    }
    .@{surely-table-prefix-cls}-resize-handle {
      right: 0px;
      width: auto;
      z-index: 1;
    }
  }

  &-scrollbar-container {
    display: flex;
    min-width: 0px;
    flex: 1 1 auto;
    flex-direction: row;
  }
  &-horizontal-scroll {
    min-height: 0;
    min-width: 0;
    width: 100%;
    display: flex;
    position: relative;
    z-index: 4;
  }
  &-horizontal-scroll-hidden {
    opacity: 0;
    transition: opacity 0.4s;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
  }
  &-horizontal-scroll-viewport {
    overflow-x: scroll;
  }
  &-vertical-scroll {
    min-height: 0;
    height: 100%;
    position: relative;
    display: flex;
  }
  &-vertical-scroll-viewport {
    overflow-x: hidden;
    overflow-y: scroll;
    flex: 1 1 auto;
    position: relative;
  }

  &-vertical-scroll-hidden {
    opacity: 0;
    transition: opacity 0.4s;
    position: absolute;
    right: 0;
  }
  &-horizontal-scroll-hidden.@{surely-table-prefix-cls}-scrolling,
  &-vertical-scroll-hidden.@{surely-table-prefix-cls}-scrolling,
  &-scrollbar-active {
    opacity: 1;
    visibility: visible;
  }

  // ========================== Pagination ==========================
  .@{surely-table-prefix-cls}-wrapper &-pagination {
    margin: 16px 0;
  }

  &-pagination {
    display: flex;
    float: none !important;
    &-left {
      justify-content: flex-start;
    }

    &-center {
      justify-content: center;
    }

    &-right {
      justify-content: flex-end;
    }
  }
  &-empty-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    padding: @table-padding-vertical @table-padding-horizontal;
    overflow-wrap: break-word;
    -webkit-font-smoothing: subpixel-antialiased;
    transition: background-color 0.3s;
  }

  // ========================== Expandable ==========================
  &-expand-icon-col {
    width: 48px;
  }

  &-row-expand-icon-cell {
    text-align: center;
  }

  &-row-indent {
    float: left;
    height: 1px;
  }

  &-row-expand-icon {
    .operation-unit();
    position: relative;
    display: inline-flex;
    float: left;
    box-sizing: border-box;
    width: @expand-icon-size;
    height: @expand-icon-size;
    padding: 0;
    color: inherit;
    line-height: ceil(((@table-font-size-sm * 1.4 - @table-border-width-base * 3) / 2)) * 2 +
      @table-border-width-base * 3;
    background: @table-expand-icon-bg;
    border: @table-border-width-base @table-border-style-base @table-border-color;
    border-radius: @surely-checkbox-border-radius;
    outline: none;
    transform: scale((unit(@surely-checkbox-size) / unit(@expand-icon-size)));
    transition: all 0.3s;
    user-select: none;
    @expand-icon-size: ceil(((@table-font-size-sm * 1.4 - @table-border-width-base * 3) / 2)) * 2 +
      @table-border-width-base * 3;

    &:focus,
    &:hover,
    &:active {
      border-color: currentColor;
    }

    &::before,
    &::after {
      position: absolute;
      background: currentColor;
      transition: transform 0.3s ease-out;
      content: '';
    }

    &::before {
      top: ceil(((@table-font-size-sm * 1.4 - @table-border-width-base * 3) / 2));
      right: 3px;
      left: 3px;
      height: @table-border-width-base;
    }

    &::after {
      top: 3px;
      bottom: 3px;
      left: ceil(((@table-font-size-sm * 1.4 - @table-border-width-base * 3) / 2));
      width: @table-border-width-base;
      transform: rotate(90deg);
    }

    // Motion effect
    &-collapsed::before {
      transform: rotate(-180deg);
    }
    &-collapsed::after {
      transform: rotate(0deg);
    }
    &-disabled {
      color: ~'var(--@{surely-table-prefix-cls}-disabled-color)';
      cursor: not-allowed;
      &:focus,
      &:hover,
      &:active {
        border-color: @table-border-color;
        color: ~'var(--@{surely-table-prefix-cls}-disabled-color)';
      }
    }

    &-spaced {
      &::before,
      &::after {
        display: none;
        content: none;
      }
      background: transparent;
      border: 0;
      visibility: hidden;
    }

    .@{surely-table-prefix-cls}-row-indent + & {
      margin-top: ((@table-font-size * @line-height-base - @table-border-width-base * 3) / 2) -
        ceil(((@table-font-size-sm * 1.4 - @table-border-width-base * 3) / 2));
      margin-right: @padding-xs;
    }
  }

  &-expanded-row &-cell:not(.@{surely-table-prefix-cls}-body-cell-range-selected) {
    &,
    &:hover {
      background: @table-expanded-row-bg;
    }
  }

  // ============================ Title =============================
  &-title {
    padding: @table-padding-vertical @table-padding-horizontal;
  }

  // ============================ Footer ============================
  &-footer {
    padding: @table-padding-vertical @table-padding-horizontal;
    color: @table-footer-color;
    background: @table-footer-bg;
  }

  // ============================ Sorter ============================
  .@{surely-table-prefix-cls}-column-has-sorters {
    // padding: 0;
    cursor: pointer;
    transition: background-color 0.3s;
    &:hover {
      background: @table-header-sort-active-bg;
    }
  }

  .@{surely-table-prefix-cls}-column-sort {
    background: ~'var(--@{surely-table-prefix-cls}-header-sort-bg)';
  }
  .@{surely-table-prefix-cls}-body &-column-sort {
    background: @table-body-sort-bg;
  }

  &-column-sorters-with-tooltip {
    display: inline-flex;
    width: 100%;
    &:after {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 100%;
      content: '';
    }
  }

  &-column-sorters {
    flex: auto;
    justify-content: space-between;
    display: inline-flex;
    align-items: center;
    width: 100%;
    &::after {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 100%;
      content: '';
      pointer-events: none;
    }
  }

  &-column-sorter {
    font-size: 0;
    transition: color 0.3s;
    margin-top: 0.15em;
    margin-bottom: -0.15em;
    margin-left: @padding-xs;
    color: ~'var(--@{surely-table-prefix-cls}-header-icon-color)';
    flex-shrink: 0;
    flex-grow: 0;

    &-full {
      margin-top: -0.2em;
      margin-bottom: 0;
    }

    &-inner {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
    }

    &-up,
    &-down {
      font-size: 11px;

      &.active {
        color: ~'var(--@{surely-table-prefix-cls}-primary-color)';
      }
    }

    &-up + &-down {
      margin-top: -0.3em;
    }
  }
  &-column-sorters:hover &-column-sorter {
    color: ~'var(--@{surely-table-prefix-cls}-header-icon-color-hover)';
  }

  &-resize-handle {
    position: absolute;
    top: 0;
    height: 100% !important;
    bottom: 0;
    left: auto !important;
    right: -7px;
    cursor: col-resize;
    touch-action: none;
    user-select: auto;
    width: 16px;
    z-index: 1;
    &-line {
      display: block;
      width: 3px;
      margin-left: 7px;
      height: 100% !important;
      background-color: ~'var(--@{surely-table-prefix-cls}-primary-color)';
      opacity: 0;
    }
    &:hover &-line {
      opacity: 1;
    }
    &.dragging::before {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 100%;
      content: ' ';
      width: 200vw;
      transform: translate(-50%);
      opacity: 0;
    }
  }
  .dragging &-resize-handle-line {
    opacity: 1;
  }

  // ============================ Filter ============================
  &-has-icon-column {
    display: flex;
    justify-content: space-between;
    flex: 1;
    width: 100%;
  }

  &-filter-trigger,
  &-menu-popup-trigger {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    margin: -4px (-@table-padding-horizontal / 2) -4px 8px;
    padding: 0 4px;
    color: ~'var(--@{surely-table-prefix-cls}-header-icon-color)';
    font-size: @table-font-size-sm;
    border-radius: @border-radius-base;
    cursor: pointer;
    transition: all 0.3s;

    &:hover {
      color: ~'var(--@{surely-table-prefix-cls}-header-icon-color-hover)';
      background: @table-header-filter-active-bg;
    }

    &.active {
      color: ~'var(--@{surely-table-prefix-cls}-primary-color)';
    }
  }
  &-menu-popup-trigger-hover > * {
    opacity: 0;
    transition: opacity 0.3s;
  }
  &-header-cell:hover &-menu-popup-trigger-hover > * {
    opacity: 1;
  }

  // Dropdown
  &-filter-dropdown-root &-filter-dropdown {
    .reset-component();

    // Reset menu
    &-menu {
      // https://github.com/ant-design/ant-design/issues/4916
      // https://github.com/ant-design/ant-design/issues/19542
      max-height: 264px;
      overflow-x: hidden;
      border: 0;
      box-shadow: none;
    }

    min-width: 120px;
    background-color: @table-filter-dropdown-bg;

    border-radius: @border-radius-base;
    box-shadow: @box-shadow-base;

    &-submenu > ul {
      max-height: calc(100vh - 130px);
      overflow-x: hidden;
      overflow-y: auto;
    }

    // Checkbox
    &,
    &-submenu {
      .@{surely-table-prefix-cls}-checkbox,
      .@{surely-table-prefix-cls}-radio {
        top: 0.2em;
      }
    }

    // Operation
    &-btns {
      display: flex;
      justify-content: space-between;
      padding: 7px 8px 7px 3px;
      overflow: hidden;
      background-color: @table-filter-btns-bg;
      border-top: @table-border-width-base @table-border-style-base @table-border-color;
    }
  }
  &-filter-dropdown-submenu {
    // Checkbox
    &,
    &-submenu {
      .@{surely-table-prefix-cls}-checkbox,
      .@{surely-table-prefix-cls}-radio {
        top: 0.2em;
      }
    }
  }

  // ========================== Selections ==========================
  &-selection-wrap {
    display: flex;
    justify-content: center;
  }
  &-selection {
    position: relative;
    display: inline-flex;
    flex-direction: column;

    &-extra {
      position: absolute;
      top: -3px;
      z-index: 1;
      cursor: pointer;
      transition: all 0.3s;
      margin-inline-start: 100%;
      padding-inline-start: @padding-xss;

      &-dropdown-icon {
        color: ~'var(--@{surely-table-prefix-cls}-header-icon-color)';
        font-size: 10px;

        &:hover {
          color: ~'var(--@{surely-table-prefix-cls}-header-icon-color-hover)';
        }
      }
    }
  }

  // ========================== Tooltip ==========================
  &-tooltip-hide-arrow {
    .ant-tooltip-arrow {
      display: none !important;
    }
  }
}
